fs = open('./LanguageToCode/Resources/Tags', 'r')
kinds = set()
for line in fs.readlines():
    tempList = line.split(' ')
    if len(tempList) != 2:
        continue
    if tempList[1][-1] == '\n':
        kinds.add(tempList[1][0:-1])
    else:
        kinds.add(tempList[1])

fs.close()
fs = open('./LanguageToCode/Resources/Kind.py', 'w')
i = 0
for kind in kinds:
    fs.write('%s = %d\n' % (kind, i))
    i = i + 1
fs.close()
